package com.foreverwin.mes.production.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Syngna
 * @since 2019-01-03
 */
@TableName("Z_CLOCK_LOG")
public class ClockLog extends Model<ClockLog> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "HANDLE", type = IdType.INPUT)
    private String handle;
    @TableField("SITE")
    private String site;
    @TableField(exist = false)
    private String resrce;
    /**
     * 岗位
     */
    @TableField("STATION")
    private String station;
    @TableField(value = "DESCRIPTION", exist = false)
    private String description;
    /**
     * 用户
     */
    @TableField("EMPLOYEE")
    private String employee;
    /**
     * 班次
     */
    @TableField("SHIFT")
    private String shift;
    /**
     * 预约时间
     */
    @TableField("APPOINTMENT_TIME")
    private Date appointmentTime;
    /**
     * 开始时间
     */
    @TableField("BEGIN_DATE_TIME")
    private Date beginDateTime;
    /**
     * 结束时间
     */
    @TableField("END_DATE_TIME")
    private Date endDateTime;
    /**
     * 在岗时间-单位秒
     */
    @TableField("ELAPSED_TIME")
    private String elapsedTime;
    /**
     * 有效状态：Y-当前有效，N-失效
     */
    @TableField("STATUS")
    private String status;
    /**
     * 是否预约上岗
     */
    @TableField("IS_APPOINTMENT")
    private String isAppointment;
    @TableField("CREATED_DATE_TIME")
    private Date createdDateTime;
    @TableField("MODIFIED_DATE_TIME")
    private Date modifiedDateTime;


    public String getHandle() {
        return handle;
    }

    public void setHandle(String handle) {
        this.handle = handle;
    }

    public String getSite() {
        return site;
    }

    public void setSite(String site) {
        this.site = site;
    }

    public String getResrce() {
        return resrce;
    }

    public void setResrce(String resrce) {
        this.resrce = resrce;
    }

    public String getStation() {
        return station;
    }

    public void setStation(String station) {
        this.station = station;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getEmployee() {
        return employee;
    }

    public void setEmployee(String employee) {
        this.employee = employee;
    }

    public String getShift() {
        return shift;
    }

    public void setShift(String shift) {
        this.shift = shift;
    }

    public Date getAppointmentTime() {
        return appointmentTime;
    }

    public void setAppointmentTime(Date appointmentTime) {
        this.appointmentTime = appointmentTime;
    }

    public Date getBeginDateTime() {
        return beginDateTime;
    }

    public void setBeginDateTime(Date beginDateTime) {
        this.beginDateTime = beginDateTime;
    }

    public Date getEndDateTime() {
        return endDateTime;
    }

    public void setEndDateTime(Date endDateTime) {
        this.endDateTime = endDateTime;
    }

    public String getElapsedTime() {
        return elapsedTime;
    }

    public void setElapsedTime(String elapsedTime) {
        this.elapsedTime = elapsedTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getIsAppointment() {
        return isAppointment;
    }

    public void setIsAppointment(String isAppointment) {
        this.isAppointment = isAppointment;
    }

    public Date getCreatedDateTime() {
        return createdDateTime;
    }

    public void setCreatedDateTime(Date createdDateTime) {
        this.createdDateTime = createdDateTime;
    }

    public Date getModifiedDateTime() {
        return modifiedDateTime;
    }

    public void setModifiedDateTime(Date modifiedDateTime) {
        this.modifiedDateTime = modifiedDateTime;
    }

    public static final String HANDLE = "HANDLE";

    public static final String SITE = "SITE";

    public static final String STATION = "STATION";

    public static final String USER = "USER";

    public static final String SHIFT = "SHIFT";

    public static final String APPOINTMENT_TIME = "APPOINTMENT_TIME";

    public static final String BEGIN_DATE_TIME = "BEGIN_DATE_TIME";

    public static final String END_DATE_TIME = "END_DATE_TIME";

    public static final String ELAPSED_TIME = "ELAPSED_TIME";

    public static final String STATUS = "STATUS";

    public static final String IS_APPOINTMENT = "IS_APPOINTMENT";

    public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";

    public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";

    @Override
    protected Serializable pkVal() {
        return this.handle;
    }

    @Override
    public String toString() {
        return "ClockLog{" +
                "handle = " + handle +
                ", site = " + site +
                ", station = " + station +
                ", employee = " + employee +
                ", shift = " + shift +
                ", appointmentTime = " + appointmentTime +
                ", beginDateTime = " + beginDateTime +
                ", endDateTime = " + endDateTime +
                ", elapsedTime = " + elapsedTime +
                ", status = " + status +
                ", isAppointment = " + isAppointment +
                ", createdDateTime = " + createdDateTime +
                ", modifiedDateTime = " + modifiedDateTime +
                "}";
    }
}